﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Streamsol.Crm
{
    public static class EntityTypeCode
    {
        /// <summary>
        /// Gets the type name for the
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string GetTypeName(int type)
        {
            switch (type)
            {
                case 1: return "account";
                case 2: return "contact";
                case 3: return "opportunity";
                case 4: return "lead";
                case 5: return "annotation";
                case 6: return "businessunitmap";
                case 8: return "systemuser";
                case 9: return "team";
                case 10: return "businessunit";
                case 11: return "principalobjectaccess";
                case 12: return "roleprivileges";
                case 13: return "systemuserlicenses";
                case 14: return "systemuserprincipals";
                case 15: return "systemuserroles";
                case 16: return "accountleads";
                case 17: return "contactinvoices";
                case 18: return "contactquotes";
                case 19: return "contactorders";
                case 20: return "servicecontractcontacts";
                case 21: return "productsalesliterature";
                case 22: return "contactleads";
                case 23: return "teammembership";
                case 24: return "leadcompetitors";
                case 25: return "opportunitycompetitors";
                case 26: return "competitorsalesliterature";
                case 27: return "leadproduct";
                case 28: return "roletemplateprivileges";
                case 29: return "subscription";
                case 30: return "filtertemplate";
                case 31: return "privilegeobjecttypecodes";
                case 32: return "salesprocessinstance";
                case 33: return "subscriptionsyncinfo";
                case 36: return "clientupdate";
                case 112: return "incident";
                case 121: return "wfprocess";
                case 122: return "wfprocessinstance";
                case 123: return "competitor";
                case 126: return "documentindex";
                case 127: return "kbarticle";
                case 129: return "subject";
                case 132: return "businessunitnewsarticle";
                case 135: return "activityparty";
                case 150: return "usersettings";
                case 1001: return "activitymimeattachment";
                case 1003: return "internaladdress";
                case 1004: return "competitoraddress";
                case 1006: return "competitorproduct";
                case 1010: return "contract";
                case 1011: return "contractdetail";
                case 1013: return "discount";
                case 1016: return "kbarticletemplate";
                case 1017: return "leadaddress";
                case 1019: return "organization";
                case 1021: return "organizationui";
                case 1022: return "pricelevel";
                case 1023: return "privilege";
                case 1024: return "product";
                case 1025: return "productassociation";
                case 1026: return "productpricelevel";
                case 1028: return "productsubstitute";
                case 1036: return "role";
                case 1037: return "roletemplate";
                case 1038: return "salesliterature";
                case 1039: return "savedquery";
                case 1043: return "stringmap";
                case 1055: return "uom";
                case 1056: return "uomschedule";
                case 1062: return "wfactionlog";
                case 1070: return "salesliteratureitem";
                case 1071: return "customeraddress";
                case 1072: return "subscriptionclients";
                case 1075: return "statusmap";
                case 1080: return "discounttype";
                case 1082: return "kbarticlecomment";
                case 1083: return "opportunityproduct";
                case 1084: return "quote";
                case 1085: return "quotedetail";
                case 1086: return "userfiscalcalendar";
                case 1088: return "salesorder";
                case 1089: return "salesorderdetail";
                case 1090: return "invoice";
                case 1091: return "invoicedetail";
                case 2000: return "annualfiscalcalendar";
                case 2001: return "semiannualfiscalcalendar";
                case 2002: return "quarterlyfiscalcalendar";
                case 2003: return "monthlyfiscalcalendar";
                case 2004: return "fixedmonthlyfiscalcalendar";
                case 2010: return "template";
                case 2011: return "contracttemplate";
                case 2012: return "unresolvedaddress";
                case 2013: return "territory";
                case 2020: return "queue";
                case 2027: return "license";
                case 2029: return "queueitem";
                case 3000: return "integrationstatus";
                case 4000: return "equipment";
                case 4001: return "service";
                case 4002: return "resource";
                case 4003: return "calendar";
                case 4004: return "calendarrule";
                case 4005: return "resourcegroup";
                case 4006: return "resourcespec";
                case 4007: return "constraintbasedgroup";
                case 4009: return "site";
                case 4010: return "resourcegroupexpansion";
                case 4011: return "interprocesslock";
                case 4023: return "emailhash";
                case 4101: return "displaystringmap";
                case 4102: return "displaystring";
                case 4110: return "notification";
                case 4200: return "activitypointer";
                case 4201: return "appointment";
                case 4202: return "email";
                case 4204: return "fax";
                case 4206: return "incidentresolution";
                case 4207: return "letter";
                case 4208: return "opportunityclose";
                case 4209: return "orderclose";
                case 4210: return "phonecall";
                case 4211: return "quoteclose";
                case 4212: return "task";
                case 4214: return "serviceappointment";
                case 4215: return "commitment";
                case 4230: return "userquery";
                case 4300: return "list";
                case 4301: return "listmember";
                case 4400: return "campaign";
                case 4401: return "campaignresponse";
                case 4402: return "campaignactivity";
                case 4403: return "campaignitem";
                case 4404: return "campaignactivityitem";
                case 4405: return "bulkoperationlog";
                case 4406: return "bulkoperation";
                case 4410: return "import";
                case 4411: return "importmap";
                case 4412: return "importfile";
                case 4413: return "importdata";
                case 4414: return "duplicaterule";
                case 4415: return "duplicaterecord";
                case 4416: return "duplicaterulecondition";
                case 4417: return "columnmapping";
                case 4418: return "picklistmapping";
                case 4419: return "lookupmapping";
                case 4420: return "ownermapping";
                case 4423: return "importlog";
                case 4424: return "bulkdeleteoperation";
                case 4425: return "bulkdeletefailure";
                case 4426: return "transformationmapping";
                case 4427: return "transformationparametermapping";
                case 4500: return "relationshiprole";
                case 4501: return "relationshiprolemap";
                case 4502: return "customerrelationship";
                case 4503: return "customeropportunityrole";
                case 4600: return "entitymap";
                case 4601: return "attributemap";
                case 4602: return "plugintype";
                case 4605: return "pluginassembly";
                case 4606: return "sdkmessage";
                case 4607: return "sdkmessagefilter";
                case 4608: return "sdkmessageprocessingstep";
                case 4609: return "sdkmessagerequest";
                case 4610: return "sdkmessageresponse";
                case 4611: return "sdkmessageresponsefield";
                case 4612: return "sdkmessagerequestinput";
                case 4613: return "sdkmessagepair";
                case 4614: return "sdkmessagerequestfield";
                case 4615: return "sdkmessageprocessingstepimage";
                case 4616: return "sdkmessageprocessingstepsecureconfig";
                case 4700: return "asyncoperation";
                case 4701: return "workflowcompletedscope";
                case 4702: return "workflowwaitsubscription";
                case 4703: return "workflow";
                case 4704: return "workflowdependency";
                case 4705: return "isvconfig";
                case 4706: return "workflowlog";
                case 4707: return "applicationfile";
                case 4708: return "organizationstatistic";
                case 4800: return "webwizard";
                case 4802: return "wizardpage";
                case 4803: return "wizardaccessprivilege";
                case 4810: return "timezonedefinition";
                case 4811: return "timezonerule";
                case 4812: return "timezonelocalizedname";
                case 4901: return "businesstask";
                case 9100: return "report";
                case 9101: return "reportentity";
                case 9102: return "reportcategory";
                case 9103: return "reportvisibility";
                case 9104: return "reportlink";
                case 9105: return "transactioncurrency";
                case 9106: return "mailmergetemplate";
                case 9107: return "importjob";
                default: return null;
            }
        }
    }
}
